Starting
a Single Timer Event
To start a
single timer event, an application must call the timeSetEvent
UINT SetTimerCallback(NPSEQ npSeq, // sequencer data
UINT
msInterval) // event interval
{
npSeq->wTimerID = timeSetEvent(
msInterval, //
delay
wTimerRes, //
resolution (global variable)
OneShotCallback, //
callback function
(DWORD)npSeq, //
user data
TIME_ONESHOT ); //
single timer event
if(!
npSeq->wTimerID)
return
ERR_TIMER;
else
return
ERR_NOERROR;
}
For an
example of the callback function OneShotCallback, see Writing a Timer
Callback Function